package haoyou.csnf.manager.module.pm.dal.mysql.rulesbasepay;

import java.util.*;

import haoyou.csnf.manager.framework.common.pojo.PageResult;
import haoyou.csnf.manager.framework.mybatis.core.query.LambdaQueryWrapperX;
import haoyou.csnf.manager.framework.mybatis.core.mapper.BaseMapperX;
import haoyou.csnf.manager.module.pm.dal.dataobject.rulesbasepay.RulesBasepayDO;
import org.apache.ibatis.annotations.Mapper;
import haoyou.csnf.manager.module.pm.controller.admin.rulesbasepay.vo.*;

/**
 * 基本薪资规则 Mapper
 *
 * @author 好有经验源码
 */
@Mapper
public interface RulesBasepayMapper extends BaseMapperX<RulesBasepayDO> {

    default PageResult<RulesBasepayDO> selectPage(RulesBasepayPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<RulesBasepayDO>()
                .eqIfPresent(RulesBasepayDO::getTieId, reqVO.getTieId())
                .eqIfPresent(RulesBasepayDO::getSeqId, reqVO.getSeqId())
                .eqIfPresent(RulesBasepayDO::getDepId, reqVO.getDepId())
                .eqIfPresent(RulesBasepayDO::getAmount, reqVO.getAmount())
                .orderByDesc(RulesBasepayDO::getId));
    }

}